
#include "NewBoost.EnvVar.h"

using namespace new_boost;

CEnvVar new_boost::EnvVar;

// [*] CEnvVar

const char* new_boost::CEnvVar::GetText_ImageSet( int sgnImageSet ) const
{
	if (sgnImageSet==0) return "Train";
	if (sgnImageSet==1) return "Test";
	return "NULL";
}

const char* new_boost::CEnvVar::GetText_PosNeg( int sgnPosNeg ) const
{
	if (sgnPosNeg==1) return "Pos";
	if (sgnPosNeg==0) return "Neg";
	return "NULL";
}

CNewBoostSrcImageList& new_boost::CEnvVar::GetSIL_SrcImage( int sgnImageSet, int sgnPosNeg )
{
	if (sgnImageSet == 0)
		if (sgnPosNeg == 1)
			return sil_Train_Pos;
		else
			return sil_Train_Neg;
	else
		if (sgnPosNeg == 1)
			return sil_Test_Pos;
		else
			return sil_Test_Neg;
}

CNewBoostSrcImageList& new_boost::CEnvVar::GetSIL_CropGT( int sgnImageSet )
{
	if (sgnImageSet == 0)
		return sil_Train_CropGT;
	else
		return sil_Test_CropGT;
}

CNewBoostCropGT_SamplingSettings& new_boost::CEnvVar::GetCGTSS_CropGT( int sgnImageSet )
{
	if (sgnImageSet == 0)
		return cgtss_Train;
	else
		return cgtss_Test;
}

std::string new_boost::CEnvVar::GetPN_sil_Image_CropGT( int sgnImageSet ) const
{
	if (sgnImageSet==0) return strPN_Base_ExampleSet + strPN_sil_Image_CropGT_Train;
	if (sgnImageSet==1) return strPN_Base_ExampleSet + strPN_sil_Image_CropGT_Test;
	return "NULL";
}

std::string new_boost::CEnvVar::GetFN_Amount_CropGT( int sgnImageSet ) const
{
	if (sgnImageSet==0) return strPN_Base_ExampleSet + strFN_Amount_CropGT_Train;
	if (sgnImageSet==1) return strPN_Base_ExampleSet + strFN_Amount_CropGT_Test;
	return "NULL";
}

std::string new_boost::CEnvVar::GetFN_BicExampleList( int sgnImageSet ) const
{
	if (sgnImageSet==0) return strPN_Base_ExampleSet + strFN_BicExampleList_Train;
	if (sgnImageSet==1) return strPN_Base_ExampleSet + strFN_BicExampleList_Test;
	return "NULL";
}

std::string new_boost::CEnvVar::GetFN_BoostModel() const
{
	return strPN_Base_BoostModel + strFN_BoostModel;
}

std::string new_boost::CEnvVar::GetFN_BoostTrainLog() const
{
	return strPN_Base_BoostModel + strFN_BoostTrainLog;
}

std::string new_boost::CEnvVar::GetFN_BoostTestROC() const
{
	return strPN_Base_BoostModel + strFN_BoostTestROC;
}

std::string new_boost::CEnvVar::GetPN_BoostDetectOutput_DetectImage(int sgnImageSet, int sgnPosNeg) const
{
	return strPN_Base_BoostDetect + "Det." + GetText_ImageSet(sgnImageSet) + "." + GetText_PosNeg(sgnPosNeg) + "\\";
}

std::string new_boost::CEnvVar::GetFN_BoostDetectOutput_DetectImage(int sgnImageSet, int sgnPosNeg, int ImageIndex) const
{
	char strTemp[10001];
	sprintf_s(strTemp, "%s%04d.jpg", GetPN_BoostDetectOutput_DetectImage(sgnImageSet, sgnPosNeg).c_str(), ImageIndex);
	return strTemp;
}

std::string new_boost::CEnvVar::GetFN_BoostDetectPRC() const
{
	return strPN_Base_BoostDetect + strFN_BoostDetectPRC;
}

